package cn.com.assistant.service;

import cn.com.assistant.entity.PubUserEntity;
import cn.com.assistant.model.EditPubUserModel;
import cn.com.assistant.model.PubUserPOJO;
import cn.com.assistant.utils.ResponseMessage;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

@Service
public interface PubUserService {
 
    List<PubUserEntity> queryAllPubUser();

    /**
     * 用户注册
     * @return
     */
    ResponseMessage pubUserRegister(PubUserPOJO pubUserPOJO);

    /**
     * 用户登录
     * @param username
     * @param password
     * @return
     */
    ResponseMessage pubUserLogin(String username, String password);

    /**
     * 用户名唯一性校验
     * @param username
     * @param id
     * @return
     */
    ResponseMessage existByUsername(String username, String id);

    /**
     * 手机号验重
     * @param phone
     * @param id
     * @return
     */
    ResponseMessage findByPhoneAndIdNot(String phone, String id);

    /**
     * 根据用户名查询用户信息
     * @param username
     * @return
     */
    PubUserEntity findByUsername(String username);

    /**
     * 修改密码
     * @param editPubUserModel
     * @return
     */
    ResponseMessage updatePassword(EditPubUserModel editPubUserModel);

    /**
     * 审核用户信息
     * @param auditStatus
     * @param auditOpinion
     * @param id
     * @return
     */
    ResponseMessage examine(Integer auditStatus, String auditOpinion, Integer id);

    /**
     * 用户分页列表
     * @param page
     * @param size
     * @param filter
     * @return
     */
    ResponseMessage findByPage(Integer page, Integer size, Map<String, Object> filter);
}